
/* Produced by David Qiu. from SYSU.
 * http://www.DavidQiu.com/
 * Welcome to my Website.
*/



#include<stdio.h>
#include<stdlib.h>


int main()
{
    int intAH[10];
    int intHH;
    int intAN=0;
    
    int i;
    for ( i=0; i<10; ++i )
    {
        scanf("%d", &intAH[i]);
    }
    scanf("%d", &intHH);
    
    intHH += 30;
    
    for ( i=0; i<10; ++i)
    {
        if ( intAH[i] <= intHH )
        {
             intAN++;
        }
    }
    
    printf("%d", intAN);
    printf("\n");
    
    //system("pause");
    
    return 0;
}
